package com.example.canalclientsync.canal.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

//import javax.persistence.Column;
import java.util.Date;

/**
 * @author chen.cr
 * @since 2023/9/15
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("t_file_data_role_record")
public class FileEditUser extends Documentable {

    //@Column(name = "master_id")
    @TableField(value = "master_id")
    private Long masterId;

    //@Column(name = "user_id")
    @TableField(value = "user_id")
    private Integer userId;
    /**
     * 数据角色类型，0：所有者，1：编辑者，2：查看者
     */
    //@Column(name = "data_role_type")
    @TableField(value = "data_role_type")
    private Integer dataRoleType;
    /**
     * 角色权限生效时间
     */
    //@Column(name = "start_time")
    @TableField(value = "start_time")
    @Field(type = FieldType.Date)
//    @Field(type = FieldType.Date, format = {}, pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;
    /**
     * 角色权限失效时间
     */
    //@Column(name = "update_time")
    @TableField(value = "end_time")
    @Field(type = FieldType.Date)
//    @Field(type = FieldType.Date, format = {}, pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    //@Column(name = "tenant_id")
    @TableField(value = "tenant_id")
    private String tenantId;
}
